<script setup>
import {computed, defineComponent} from "vue";
import {useStore} from "vuex";
defineComponent({
  name:'ComponentView',

})

const store = useStore();
const complete = computed(()=> store.getters.complete)
</script>

<template>
  <div>
    <ul>
      <li v-for="item in complete" :key="item.id" :class="{through:item.isChecked}">
        <input type="checkbox" v-model="item.isChecked">{{item.task}}
      </li>
    </ul>
  </div>
</template>

<style scoped>
.through{
  text-decoration: line-through;
}
</style>